/*
 * This class is only used for choosing a file using the file browser and returning the path
 * to the method that called it.
 */

import java.awt.Component;

import javax.swing.JFileChooser;


public class FileChooser {

	
	public String findFile (Component parent) {
		JFileChooser fc = new JFileChooser();
		fc.setFileSelectionMode ( JFileChooser.FILES_ONLY );
		
		if (fc.showOpenDialog(parent) == JFileChooser.APPROVE_OPTION ) {
			return fc.getSelectedFile().getAbsolutePath();
		}
		
		return null;
		}
	}